//商家信息
let express = require('express');
let path = require('path');
//引入自定义模块
let user = require('../model/user');
let order = require('../model/order');
let seller = require('../model/seller');

var router = express.Router();


router.get('/',function(req,res,next){
    res.sendStatus(404);
    //_dirname:当前文件的路径，path.join():合并路径
});
/**
 *登录验证功能
 */
router.post('/',function(req,res) {
    let sellerID =  req.body.sellerID;
    seller.search(sellerID,function (result){
        if(result.length === 0){
            res.send({sellerInfoStatus:1});
        }
        else{
            result[0].sellerInfoStatus = 0;
            result[0].logo = 'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png';
            res.send(result[0]);
        }

    })
})

module.exports = router;